package com.itheima.day20.demo07;

import java.util.function.Supplier;

public class SupplierDemo01 {
    public static void main(String[] args) {
        String s = getObject(() -> "13123");
        Integer i = getObject(() -> 123);
        stu stu = getObject(() -> new stu());

    }

    public static <T> T getObject(Supplier<T> supplier) {
        return supplier.get();
    }
}

class stu {

}
